<?php
 @header("Content-Type:text/html;charset=utf-8");

 @include_once("conn.php");

 if(!isset($_GET['gid'])){
      $obj =array();
      $obj["status"] = false;
      $obj["msg"] = "请传入完整参数";
      $json = json_encode($obj);
      exit($json);
 }

 $gid =$_GET["gid"];

 $sql = "select * from `goodslist_copy` where goodsId='$gid'";

 $result = mysqli_query($conn,$sql);

 $obj = array();
 if($result){
     $item = mysqli_fetch_assoc($result);
     if($item){
        $item["bigPicList"] =explode(",",$item["bigPicList"]);
        $item["smallPicList"] =explode(",",$item["smallPicList"]);
        $obj["status"]=true;
        $obj["msg"] = "OK";
        $obj["data"] = $item;
    }
    else{
     $obj["status"] = false;
     $obj["msg"] = "查询数据不存在";
    }
 }else{
    $obj["status"]=false;
    $obj["msg"] = "sql语句有误";
    $obj["sql"] = $sql;
 }
 echo json_encode($obj);
?>